package com.example.terminalservice.service;

import com.example.terminalservice.common.Result;
import com.example.terminalservice.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.terminalservice.pojo.dto.LoginDTO;
import com.example.terminalservice.pojo.dto.PwdDTO;
import com.example.terminalservice.pojo.dto.RegisterDTO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
* @author 28142
* @description 针对表【sys_user】的数据库操作Service
* @createDate 2023-08-04 16:35:01
*/
public interface UserService extends IService<User> {

    /**
     * 登录
     * @author 杨雨盛
     * @date 2023/8/4 17:43
     * @param loginDTO
     * @return com.example.terminalservice.common.Result
     */
    Result login(LoginDTO loginDTO);

    boolean register(RegisterDTO registerDTO);

    Result findPage(Integer pageNum, Integer pageSize, String username);

    boolean saveUser(User user);

    boolean changePwd(PwdDTO pwdDTO);

    Result uploadAvatar(MultipartFile file, HttpServletRequest request);

    User getUserByUsername(String username);
}
